package com.cq.hd.member.api;

import com.cq.hd.common.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "hd-o2o-member-service", contextId = "user-business-api")
public interface TbUserBusinessApi {

    // 根据用户id获取商家id列表
    @GetMapping("/member/userBusiness/getBusinessIdsByUserId")
    Result<List<Long>> getBusinessIdsByUserId(@RequestParam("userId") Long userId);

    // 用户跟商家关联
    @GetMapping("/member/userBusiness/related")
    Result<Boolean> related(@RequestParam("userId") Long userId, @RequestParam("businessId") Long businessId);
}
